package controller;

import entity.Follow_up;
import entity.MyResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import service.follow_upService;

@Controller
@RequestMapping("/connection")
public class Follow_upController {
    @Autowired
    private follow_upService follow_upService;

    @RequestMapping("/toAdd")
    public String toAdd(){
        return "follow_up_add.jsp";
    }
    @ResponseBody
    @RequestMapping("/add")
    public MyResult add(Follow_up follow_up){
        boolean flag = follow_upService.insert(follow_up);
        return new MyResult(0);
    }
}
